# 排序算法
# 从大到小,从小到大
# list_01 = [1, 2, 3, 4, 5, 6, 7]
# 外层计数,内层交换

# print(range(len(list_01)))

# for r in (range(len(list_01))):
#     print(r)

# for r in range(len(list_01) - 1):
#     for c in range(r + 1, len(list_01)):
#         if list_01[r] < list_01[c]:
#             list_01[r], list_01[c] = list_01[c], list_01[r]
# print(list_01)

# list_epidemic = [
#     {
#         "region": "台湾", "new": 16,
#         "now": 2339, "total": 16931,
#     },
#     {
#         "region": "陕西", "new": 182,
#         "now": 8519, "total": 1573,
#     },
#     {
#         "region": "浙江", "new": 2,
#         "now": 505, "total": 2008,
#     },
# ]


# print(f"{list_epidemic[0]["region"]}地区新增{list_epidemic[0]["new"]}人")

# new_list = []
# for i in range(len(list_epidemic)):
#     if list_epidemic[i]["new"] > 10:
#         new_list.append(list_epidemic[i]["new"])
# print(new_list)
# if list_epidemic[i]["total"] < 10000:
#     print(f"{list_epidemic[i]["region"]}地区新增{list_epidemic[i]["new"]}人")

# max_now = list_epidemic[0]["now"]
# for i in range(1, len(list_epidemic)):
#     if max_now < list_epidemic[i]["now"]:
#         max_now = list_epidemic[i]["now"]
# print(max_now)

# for c in range(len(list_epidemic) - 1):
#     for v in range(c + 1, len(list_epidemic)):
#         if list_epidemic[c]["now"] < list_epidemic[v]["now"]:
#             list_epidemic[c], list_epidemic[v] = list_epidemic[v], list_epidemic[c]


# 函数
# def attack():
#     print('打架')
#
# attack()

# def list_creat(p_list):
#     """
#     创建list
#     :param p_list:
#     :return:
#     """
#     for item in p_list:
#         print(item)
#
#
# p_list = [1, 3, 4, 56, 75, 3, 3]
#
# list_creat(p_list)


# number = int(input("请输入整数:"))  # 5
# number = 6
# for row in range(number):
#     if row == 0 or row == number - 1:
#         print("*" * number)
#     else:
#         print("*%s*" % (" " * (number - 2)))

# def func01(p1, p2, p3):
#     print(p1)
#     print(p2)
#     print(p3)
#
#
# func01(1, 2)
# func01(4, 5, 6, 7)

# def func02(p1=1, p2=2):
#     return p1 + p2
#
#
# print(func02(3, 2))
# print(func02())

# def hour_minute_to_second(hour=0, minute=0, second=0):
#     print(hour * 3600 + minute * 60 + second)
#
#
# hour_minute_to_second(1, 2, 3)
# hour_minute_to_second(minute=5, second=6)
# hour_minute_to_second(1, second=1)
# hour_minute_to_second(second=1)

